package pres.wchen.bussiness.web.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import pres.wchen.bussiness.service.SysUserService;
import pres.wchen.bussiness.vo.SysUserVO;
import pres.wchen.bussiness.web.BaseController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;

/**
 * @作者： wchen
 * @描述：
 * @创建时间： 2018/1/16 16:20
 * @版本：Copyright 2018, Inc. All Rights Reserved.
 * @修改信息：
 */

@Controller
@RequestMapping("/common")
public class CommonController extends BaseController{
    private static final Logger logger = LoggerFactory.getLogger(CommonController.class);

    @GetMapping("error/{code}")
    public ModelAndView doLogin(@PathVariable("code") String code){
        if("403".equals(code)){
            return super.dealInfoResult("/common/error/403", null);
        }else if("404".equals(code)){
            return super.dealInfoResult("/common/error/404", null);
        }else{
            return super.dealInfoResult("/common/error/other", null);
        }
    }



}
